package ua.com.softway.db.export;

import java.io.PrintWriter;

public class Exporter {

    protected PrintWriter out;

    public Exporter(PrintWriter out) {
        this.out = out;
    }

    public void begin() {
        out.println("begin;");
        out.println("set @@session.UNIQUE_CHECKS=0;");
        out.println("set @@session.FOREIGN_KEY_CHECKS=0;");
        out.println("set @@session.SQL_MODE='NO_AUTO_VALUE_ON_ZERO';");
    }
    
    public void end() {
        out.println("commit;");
    }
}
